<?php
/**
 * @package    Joomla.Tutorials
 * @subpackage Components
 * @link http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1
 * @license    GNU/GPL
*/
 
// no direct access
 
defined( '_JEXEC' ) or die( 'Restricted access' );
 
jimport( 'joomla.application.component.view');
jimport( 'joomla.filesystem.path' );

jimport( 'joomla.database.database' );
 
/**
 * HTML View class for the HelloWorld Component
 *
 * @package    HelloWorld
 */
 
class wotclanViewsave extends JView
{
    function display($tpl = null)
    {
    	
      $db =& JFactory::getDbo();
      $greeting = "Les tanks de la DB!";
      $this->assignRef( 'greeting', $greeting );
      parent::display($tpl);
      $query = $db->getQuery(true);
    
      $query="UPDATE `#__wotclan_tanks` SET `lvl`='".$_POST['lvl']."', `tanktype`='".$_POST['tanktype']."', `common_name`='".$_POST['common_name']."' WHERE uniqid='".$_REQUEST['id']."';";
      $db->setQuery($query);
      echo $query;
      $db->query();
      
    }
}
